home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ccccssssfffffffftttt3333dddduuuu,,,,zzzzddddfffffffftttt3333dddduuuu((((3333FFFF)))) ccccssssfffffffftttt3333dddduuuu,,,,zzzzddddfffffffftttt3333dddduuuu((((3333FFFF))))
-
-
-
- NNNNAAAAMMMMEEEE
- ccccssssfffffffftttt3333dddduuuu,,,, zzzzddddfffffffftttt3333dddduuuu ---- 3D, Complex to Real, Inverse Fast Fourier
- Transforms.
-
- SSSSYYYYNNNNOOOOPPPPSSSSYYYYSSSS
- _F_o_r_t_r_a_n :
- ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee ccccssssfffffffftttt3333dddduuuu((((ssssiiiiggggnnnn,,,,nnnn1111,,,,nnnn2222,,,,nnnn3333,,,,aaaarrrrrrrraaaayyyy,,,,llllaaaa1111,,,,llllaaaa2222,,,,ccccooooeeeeffff))))
- iiiinnnntttteeeeggggeeeerrrr ssssiiiiggggnnnn,,,, nnnn1111,,,, nnnn2222,,,, nnnn3333,,,, llllaaaa1111,,,, llllaaaa2222
- rrrreeeeaaaallll aaaarrrrrrrraaaayyyy((((llllaaaa1111,,,,llllaaaa2222,,,,nnnn3333))))
- rrrreeeeaaaallll ccccooooeeeeffff((((((((nnnn1111++++11115555))))++++2222****((((nnnn2222++++11115555))))++++2222****((((nnnn3333++++11115555))))))))
-
- ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee zzzzddddfffffffftttt3333dddduuuu((((ssssiiiiggggnnnn,,,,nnnn1111,,,,nnnn2222,,,,nnnn3333,,,,aaaarrrrrrrraaaayyyy,,,,llllaaaa1111,,,,llllaaaa2222,,,,ccccooooeeeeffff))))
- iiiinnnntttteeeeggggeeeerrrr ssssiiiiggggnnnn,,,, nnnn1111,,,, nnnn2222,,,, nnnn3333,,,, llllaaaa1111,,,, llllaaaa2222
- rrrreeeeaaaallll****8888 aaaarrrrrrrraaaayyyy((((llllaaaa1111,,,,llllaaaa2222,,,,nnnn3333))))
- rrrreeeeaaaallll****8888 ccccooooeeeeffff((((((((nnnn1111++++11115555))))++++2222****((((nnnn2222++++11115555))))++++2222****((((nnnn3333++++11115555))))))))
-
-
- _C :
- ####iiiinnnncccclllluuuuddddeeee <<<<fffffffftttt....hhhh>>>>
- iiiinnnntttt ccccssssfffffffftttt3333dddduuuu((((iiiinnnntttt ssssiiiiggggnnnn,,,,iiiinnnntttt nnnn1111,,,,iiiinnnntttt nnnn2222,,,,iiiinnnntttt nnnn3333,,,,ffffllllooooaaaatttt ****aaaarrrrrrrraaaayyyy,,,,
- iiiinnnntttt llllaaaa1111,,,, iiiinnnntttt llllaaaa2222,,,, ffffllllooooaaaatttt ****ccccooooeeeeffff))));;;;
- iiiinnnntttt zzzzddddfffffffftttt3333dddduuuu((((iiiinnnntttt ssssiiiiggggnnnn,,,,iiiinnnntttt nnnn1111,,,,iiiinnnntttt nnnn2222,,,,iiiinnnntttt nnnn3333,,,,ddddoooouuuubbbblllleeee ****aaaarrrrrrrraaaayyyy,,,,
- iiiinnnntttt llllaaaa1111,,,, iiiinnnntttt llllaaaa2222,,,, ddddoooouuuubbbblllleeee ****ccccooooeeeeffff))));;;;
-
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- ccccssssfffffffftttt3333dddduuuu and zzzzddddfffffffftttt3333dddduuuu compute in place the real 3D sequence of size N1 x
- N2 x N3 from its complex Fourier transform. The value F{j1,j2,j3} of the
- transform of the 3D sequence f{i1,i2,i3} is equal to:
- F{j1,j2,j3} = Sum( W1^(i1*j1)*W2^(i2*j2)*W3^(i3*j3)*f{i1,i2,i3} ),
- for i[123] =0,...,(N[123]-1)
- W[123] = exp( (Sign*2*sqrt(-1)*PI) / N[123] )
-
-
- SSSSttttoooorrrraaaaggggeeee
- It is assumed that the (N1 x N2 x N3) 3D sequence is stored along
- dimension N1. So the index {i+1,j,l} has an offset of 1 element with
- respect to {i,j,l}, and {i,j+1,k} an offset of _l_a_1 elements with respect
- to {i,j,k}, and {i,j,k+1} an offset of (_l_a_1*_l_a_2) elements with respect to
- {i,j,k}.
- NNNNOOOOTTTTEEEE :::: la1 must be larger (or equal) to 2*((N1+2)/2), and la2 larger (or
- equal) to N2.
-
-
- AAAAllllggggoooorrrriiiitttthhhhmmmm
- The real-to-complex Direct 3D Fourier transform is computed with a row-
- column approach.
- - First, N1*N2 FFTs complex-to-complex of size N3 are performed,
- stride=(la1/2)*la2, and leading_dimension=1.
- - then, N3 2D FFTs real-to-complex of size N1xN2 are evaluated, stride =
- 1
- and leading_dimension=la1.
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- ccccssssfffffffftttt3333dddduuuu,,,,zzzzddddfffffffftttt3333dddduuuu((((3333FFFF)))) ccccssssfffffffftttt3333dddduuuu,,,,zzzzddddfffffffftttt3333dddduuuu((((3333FFFF))))
-
-
-
- As the final output sequence has real values, only half of the transform
- are needed since the sample {(N1-k),l,m} of the real-to-complex transform
- is be the conjugate of the sample {k,l,m}.
- However, some extra space is necessary, and the relation
- (la1>=2*((N1+2)/2)) must hold.
-
-
- PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
- SSSSIIIIGGGGNNNN Integer specifying which sign to be used for the expression of W
- (see above) - must be either +1 or -1.
- Unchanged on exit.
-
- NNNN1111 Integer, the first dimension size of the 3D sequence. Unchanged on
- exit.
-
- NNNN2222 Integer, the second dimension size of the 3D sequence. Unchanged on
- exit.
-
- NNNN3333 Integer, the third dimension size of the 3D sequence. Unchanged on
- exit.
-
- AAAARRRRRRRRAAAAYYYY Array containing the samples of the 3D sequence to be transformed.
- On input, the element {i,j,k} of the sequence is stored as A(i,j,k) in
- _F_o_r_t_r_a_n , and A[i+j*la1+k*la1*la2] in _C. On exit, the array is
- overwritten.
-
- LLLLAAAA1111 Integer, first leading dimension: increment between the samples of
- two consecutive 1D sub-sequences (e.g between {i,j+1,k} and {i,j,k} ).
- Unchanged on exit.
-
- LLLLAAAA2222 Integer, second leading dimension: number of the 1D sub-sequence
- between two consecutive 2D sub-sequences (e.g between {i,j,k+1} and
- {i,j,k}). Unchanged on exit.
-
- CCCCOOOOEEEEFFFFFFFF Array of at least ( (N1+15)+2*(N2+15)+2*(N3+15) ) elements. On
- entry it contains the Sines/Cosines and factorization of N. COEFF needs
- to be initialized with a call to scfft3dui or dzfft3dui. Unchanged on
- exit.
-
-
- EEEExxxxaaaammmmpppplllleeee ooooffff CCCCaaaalllllllliiiinnnngggg SSSSeeeeqqqquuuueeeennnncccceeee
- 3D FFT computed on a real sequence of size 100x64x125. The elements of
- each sequence are stored with increment (stride) 1, the offset between
- the first element of two succesive 1D sub-sequences (first leading
- dimension) is 102, and the number of 1D sub-sequence between two
- succesive 2D sub-sequences (second leading dimension) is 64.
- Note : 102 >= 100+2 , and 64 >= 64.
- _F_o_r_t_r_a_n
- real array(0:102-1,0:64-1,0:125-1)
- real coeff(100+15 + 2*(64+15) + 2*(125+15))
- call scfft3dui( 100, 64, 125, coeff)
- call scfft3du( -1, 100, 64, 125, array, 102, 64, coeff)
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- ccccssssfffffffftttt3333dddduuuu,,,,zzzzddddfffffffftttt3333dddduuuu((((3333FFFF)))) ccccssssfffffffftttt3333dddduuuu,,,,zzzzddddfffffffftttt3333dddduuuu((((3333FFFF))))
-
-
-
- call csfft3du( 1, 100, 64, 125, array, 102, 64, coeff)
-
- _C
- #include <fft.h>
- float array[102*64*125], *coeff;
- coeff = scfft3dui( 100, 64, 125, NULL);
- scfft3du( -1, 100, 64, 125, array, 102, 64, coeff)
- csfft3du( 1, 100, 64, 125, array, 102, 64, coeff)
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- fft, scfft3dui, dzfft3dui, scfft3du, dzfft3du
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-